# 导包
from rest_framework import serializers
# 导入数据库类
from myapp.models import User


# 定义序列化类
class UserSer(serializers.ModelSerializer):
    class Meta:
        model = User
        # 声明字段
        fields = '__all__'
